<?php

namespace app\studentLayer\controller;


use app\student\model\classesModel;
use think\Db;

class StudentBase extends StudentVerify {

    public function Student_Base(){

        $Student = Db::table('s_student')->alias('s')
            ->field('s.*, GROUP_CONCAT(c. NAME, t. NAME) AS c_t_name,cls.`name` AS cls_name')
            ->leftJoin('s_classes cls', 's.cls_id = cls.id')
            ->leftJoin('s_report r', 's.id = r.s_id')
            ->leftJoin('s_course c', 'c.id = r.c_id')
            ->leftJoin('s_teacher t', 't.id = r.t_id')
            ->where(['s.id' => session('Student.id'), 's.name' => session('Student.name'), 's.password' => session('Student.password')])
            ->group('s.id')->select();
//var_dump($Student);die;
        $Student = $Student[0];

        $this->assign('Student', $Student);
        return $this->fetch('/LoginView/Select_Student_Login');
    }

}